//
//  UIView+Frame.m
//  01-UIView、UIWindow
//
//  Created by Snow on 16/7/14.
//  Copyright © 2016年 QC.L. All rights reserved.
//

#import "UIView+Frame.h"

@implementation UIView (Frame)
- (void)setX_x:(CGFloat)x_x
{
    CGRect rect = self.frame;
    rect.origin.x = x_x;
    self.frame = rect;
}

- (CGFloat)x_x
{
    return self.frame.origin.x;
}

- (void)setX_y:(CGFloat)x_y
{
    CGRect rect = self.frame;
    rect.origin.y = x_y;
    self.frame = rect;
}
- (CGFloat)x_y
{
    return self.frame.origin.y;
}

- (void)setX_width:(CGFloat)x_width
{
    CGRect rect = self.frame;
    rect.size.width = x_width;
    self.frame = rect;
}
- (CGFloat)x_width
{
    return self.frame.size.width;
}

- (void)setX_height:(CGFloat)x_height
{
    CGRect rect = self.frame;
    rect.size.height = x_height;
    self.frame = rect;
}
- (CGFloat)x_height
{
    return self.frame.size.height;
}
@end
